<ui:composition
	template="/WEB-INF/templates/FrontOffice/BasicTemplate.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

	<ui:define name="title">Vérification du paiement</ui:define>



	<ui:define name="content">
		<h:form id="contentFacture">

			<p:panel id="carte">
			
				<h:outputLabel for="name" value="#{msgs1.label_nom_carte} :"
					style="font-weight:bold" />
				<p:inputText id="name" value="#{carteDeCreditBean.nom}"
					validatorMessage="#{msgs1.label_carte_format_lettres}" required="true">
					<f:validateRegex pattern="^([a-zA-Z]{1})+$" />
				</p:inputText>
				<p:message for="name" />
				<br />

				<h:outputLabel for="nb_carte" value="#{msgs1.label_number_carte} :"
					style="font-weight:bold" />
				<p:inputText id="nb_carte" value="#{carteDeCreditBean.nb_carte}"
					validatorMessage="#{msgs1.label_carte_format10}" required="true">
					<f:validateRegex pattern="[0-9]{10}" />
				</p:inputText>
				<p:message for="nb_carte" />
				<br />

				<h:outputLabel for="nb_cryp" value="#{msgs1.label_number_cryp} :"
					style="font-weight:bold" />
				<p:inputText id="nb_cryp" value="#{carteDeCreditBean.nb_cryp}"
					validatorMessage="#{msgs1.label_carte_format3}" required="true">
					<f:validateRegex pattern="[0-9]{3}" />
				</p:inputText>
				<p:message for="nb_cryp" />
				<br />

				<h:outputLabel  value="#{msgs1.label_number_date} :" />
				<p:calendar id="date" value="#{carteDeCreditBean.date}" 
					showOn="button" required="true"/>
					<p:message for="date" />
				<br />
				<br />
				<p:commandButton value="#{msgs1.label_valider}"
					action="#{carteDeCreditBean.valider}" update="carte" ajax="false" />
				<br />

				<div>
					<h:outputText value="#{msgs1.label_carte_refuse}"
						rendered="#{carteDeCreditBean.fail}" />
				</div>


			</p:panel>
		</h:form>

	</ui:define>
</ui:composition>